'****************************************************************************'
'                                                                            '
' Copyright (C) 2010 Muhammad alaa                                           '
'                                                                            '
' This program is free software; you can redistribute it and/or modify       '
' it under the terms of the GNU General Public License as published by       '
' the Free Software Foundation; either version 2 of the License, or          '
' (at your option) any later version.                                        '
'                                                                            '
' This program is distributed in the hope that it will be useful,            '
' but WITHOUT ANY WARRANTY; without even the implied warranty of             '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              '
' GNU General Public License for more details.                               '
'                                                                            '
' You should have received a copy of the GNU General Public License along    '
' with this program; if not, write to the Free Software Foundation, Inc.,    '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                '
'                                                                            '
'****************************************************************************'

Namespace OLE

    <ComImport()> _
    <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
    <Guid(IID.OLE.IRecordInfo)> _
    Public Interface IRecordInfo
        <PreserveSig()> Function RecordInit(<Out()> ByRef pvNew As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function RecordClear(ByVal pvExisting As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function RecordCopy(ByVal pvExisting As IntPtr, <Out()> ByRef pvNew As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetGUID(<Out()> ByRef pGUID As Guid) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetName(<Out(), MarshalAs(UnmanagedType.BStr)> ByRef pBstrName As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetSize(<Out()> ByRef pcbSize As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetTypeInfo(<Out()> ByRef ppTypeInfo As ITypeInfo) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetField(ByVal pvData As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> ByVal szFieldName As String, <Out()> ByRef pvarField As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetFieldNoCopy(ByVal pvData As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> ByVal szFieldName As String, ByRef pvarField As IntPtr, <Out()> ByRef ppvDataCArray As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function PutField(ByVal wFlags As UInt32, ByRef pvData As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> ByVal szFieldName As String, ByRef pvarField As Object) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function PutFieldNoCopy(ByVal wFlags As UInteger, ByRef pvData As IntPtr, <MarshalAs(UnmanagedType.LPWStr)> ByVal szFieldName As String, ByRef pvarField As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetFieldNames(<Out()> ByRef pcNames As UInteger, <Out(), MarshalAs(UnmanagedType.LPArray, ArraySubType:=UnmanagedType.BStr)> ByRef rgBstrNames() As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function IsMatchingType(ByRef pRecordInfo As IRecordInfo) As Boolean
        <PreserveSig()> Function RecordCreate() As IntPtr
        <PreserveSig()> Function RecordCreateCopy(ByVal pvSource As IntPtr, <Out()> ByRef ppvDest As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function RecordDestroy(ByVal pvRecord As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
    End Interface

End Namespace